<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>计算 EZMLM 所需的散列值</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.ezmlm-hash" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ezmlm_hash</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.2, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">ezmlm_hash</span> &mdash; <span class="dc-title">计算 EZMLM 所需的散列值</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ezmlm-hash-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ezmlm_hash</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$addr</code></span>
   ) : <span class="type">int</span></div>

  <p class="simpara">
   <span class="function"><strong>ezmlm_hash()</strong></span> 计算用于在 MySQL 数据库中保存 EZMLM 邮件列表的散列值。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ezmlm-hash-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">addr</code></dt>

     <dd>

      <p class="para">
       要进行散列算法的电子邮件地址。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ezmlm-hash-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   <code class="parameter">addr</code> 的散列值。
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-function.ezmlm-hash-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4042">
    <p><strong>Example #1 计算散列值并订阅一个用户</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$user&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"joecool@example.com"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$hash&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ezmlm_hash</span><span style="color: #007700">(</span><span style="color: #0000BB">$user</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$query&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">sprintf</span><span style="color: #007700">(</span><span style="color: #DD0000">"INSERT&nbsp;INTO&nbsp;sample&nbsp;VALUES&nbsp;(%s,&nbsp;'%s')"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$hash</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$user</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query</span><span style="color: #007700">(</span><span style="color: #0000BB">$query</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;using&nbsp;PHPLIB&nbsp;db&nbsp;interface<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
  </p>
 </div>

</div></div></div></body></html>